
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="mytag" uri="MyTag" %>
<%@ page session="true" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>用户主页</title>


</head>
<body>
<%@ include file="banner.jsp" %>
网站访问量为<mytag:counter />
    <div class="postList" style="height:730px">
        <ul class="postList">
            <c:forEach items="${paginationSupport.items}" var="post" >
                <li id="post_<c:out value="${post.postID}"/>" style="height:70px">
                    <div class="postMessage" style="height:30px">
                        <a href="<c:url value="/post/${post.postID}" />"><c:out value="${post.topic}" /></a></div>
                    <div class="postTime" style="border-bottom: 1px solid #dee2e6;">
                        <fmt:formatDate value="${post.postedTime}" pattern="yyyy-MM-dd HH:mm:ss"/>
                        by <c:out value="${post.poster.userName }" />
                        点击量：<c:out value="${post.clickCount }" />
                    </div>
                </li>
            </c:forEach>
        </ul>
    </div>
    每页${paginationSupport.pageSize}条吐槽，  第${paginationSupport.currentPageNo}/${paginationSupport.totalPageCount}页,共${paginationSupport.totalCount}条帖子
    <c:if test="${paginationSupport.previousPage}">
        <a href="<c:url value="//userHomePage?pageNo=${paginationSupport.currentPageNo-1}" />" >上一页</a>
    </c:if>
    <c:if test="${paginationSupport.nextPage}">
        <a href="<c:url value="//userHomePage?pageNo=${paginationSupport.currentPageNo+1}" />" >下一页</a>
    </c:if>

    <c:if test="${sessionScope.user != null}">
        <a href="<c:url value="/logout" />" /> 注销</a>  欢迎用户：${sessionScope.user.userName} <br>
    </c:if>


<%@ include file="footer.jsp" %>
</body>
</html>
